%p#notice= notice
%h1 车辆列表
%table.table.table-bordered
  %thead
    %tr
      %th 名称
      %th 品牌
      %th 主型号
      %th 分型号
      %th 车牌号
      %th 挂靠
      %th 发动机号
      %th 车架号
      %th 注册日期
      %th 类型
      %th 颜色
      %th 车主姓名
      %th 车主电话
      %th 年检到期日期
      %th{:colspan => "3"}
  %tbody
    - @cars.each do |car|
      %tr
        %td= car.name
        %td= car.brand
        %td= car.version_main
        %td= car.version_sub
        %td= car.plate_number
        %td= car.attached
        %td= car.engine_number
        %td= car.frame_number
        %td= car.register_date
        %td= car.auto_type
        %td= car.color
        %td= car.owner_name
        %td= car.owner_mobile
        %td= car.inspection_peroid_of_validity
        %td
          = link_to '显示', car, class: "btn btn-primary btn-sm"
          = link_to '编辑', edit_car_path(car), class: "btn btn-primary btn-sm"
          = link_to '删除', car, method: :delete, data: { confirm: 'Are you sure?' }, class: "btn btn-danger btn-sm"
%br/
= link_to '新增车辆', new_car_path, class: "btn btn-primary"